package com.example.tsproject.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import lombok.Data;

/**
 * 
 * @TableName studentsubmissions
 */
@TableName(value ="studentsubmissions")
@Data
public class Studentsubmissions implements Serializable {
    /**
     * 
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 
     */
    @TableField(value = "student_id")
    private Integer student_id;

    /**
     * 
     */
    @TableField(value = "assignment_id")
    private Integer assignment_id;

    /**
     * 
     */
    @TableField(value = "stu_status")
    private Object stu_status;

    /**
     * 
     */
    @TableField(value = "score")
    private BigDecimal score;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Studentsubmissions other = (Studentsubmissions) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getStudent_id() == null ? other.getStudent_id() == null : this.getStudent_id().equals(other.getStudent_id()))
            && (this.getAssignment_id() == null ? other.getAssignment_id() == null : this.getAssignment_id().equals(other.getAssignment_id()))
            && (this.getStu_status() == null ? other.getStu_status() == null : this.getStu_status().equals(other.getStu_status()))
            && (this.getScore() == null ? other.getScore() == null : this.getScore().equals(other.getScore()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getStudent_id() == null) ? 0 : getStudent_id().hashCode());
        result = prime * result + ((getAssignment_id() == null) ? 0 : getAssignment_id().hashCode());
        result = prime * result + ((getStu_status() == null) ? 0 : getStu_status().hashCode());
        result = prime * result + ((getScore() == null) ? 0 : getScore().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", student_id=").append(student_id);
        sb.append(", assignment_id=").append(assignment_id);
        sb.append(", stu_status=").append(stu_status);
        sb.append(", score=").append(score);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}